# @author: jungle
# @create : 2024/9/28 20:53
import sys

from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QLineEdit, QPushButton

if __name__ == '__main__':
    app = QApplication(sys.argv)
    w = QWidget()
    # 设置窗口标题
    w.setWindowTitle("第一个PyQt程序")
    # w.setGeometry(100, 100, 500, 300)


    # 在窗口添加控件
    # 纯文本
    q_label = QLabel("账号", w)
    q_label.setGeometry(20, 20, 30, 20)

    # 文本框
    edit = QLineEdit(w)
    edit.setPlaceholderText("请输入账号")
    edit.setGeometry(55, 20, 200, 20)

    # 按钮
    button = QPushButton("注册", w)
    button.setGeometry(50, 80, 70, 30)

    # 展示窗口标题
    w.show()
    # 程序进行循环等待状态
    app.exec_()
